package org.ysu.entity;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableField;
import org.ysu.core.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 管理员表
 * </p>
 *
 * @author LiuShuo
 * @since 2024-08-14
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "Admin对象", description = "管理员表")
public class Admin extends BaseEntity {

    private static final long serialVersionUID = 1L;

    public Admin(String email, String password) {
        this.email = email;
        this.password = password;
    }

    public Admin(String name, Integer sex, String phone, String idcard, String email, String password, Long areaId, String icon) {
        this.name = name;
        this.sex = sex;
        this.phone = phone;
        this.idcard = idcard;
        this.email = email;
        this.password = password;
        this.areaId = areaId;
        this.icon = icon;
    }

    public Admin(String name, Integer sex, String idcard, String phone, String email, String password, Long areaId) {
        this.name = name;
        this.sex = sex;
        this.idcard = idcard;
        this.phone = phone;
        this.email = email;
        this.password = password;
        this.areaId = areaId;
    }

    public Admin(Long id, String name, Long areaId, String phone, Integer sex, String idcard, String email) {
        super(id);
        this.name = name;
        this.areaId = areaId;
        this.phone = phone;
        this.sex = sex;
        this.idcard = idcard;
        this.email = email;
    }

    public Admin(Long id, Boolean status) {
        super(id);
        this.status = status;
    }

    @ApiModelProperty("姓名")
    private String name;

    @ApiModelProperty("0-女 1-男")
    private Integer sex;

    @ApiModelProperty("身份证号")
    private String idcard;

    @ApiModelProperty("手机号")
    private String phone;

    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("地区id")
    private Long areaId;

    @ApiModelProperty("状态1:是 0:否")
    private Boolean status;

    @ApiModelProperty("头像")
    private String icon;

    //不需要映射到数据库表中的列
    @TableField(exist = false)
    private String roleName;

    @TableField(exist = false)
    private String province;

    @TableField(exist = false)
    private String city;

    @TableField(exist = false)
    private String county;

    @TableField(exist = false)
    private String township;




}
